<?php
class Search_IndexController extends Zend_Controller_Action {
	
	public function inputAction() {
		$this->_helper->incLocalRes(array('search.css'));
	}
	
	public function indexAction(){
		$page = $this->_helper->checkParam('page',false,'Int','Int');
		$page = ( $page ) ? $page : 1;
		$q = $this->_helper->checkParam('q',false,'StripTags','NotEmpty');	
		if($q!=""){
			$model=new Search_Model_Finder();
			$res=$model->search($q);
			$this->view->hits=$res;
			$this->view->query=$q;
			$this->view->page=$page;
			$this->view->limit=10;
		}
	} 
	

}
